<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
    <h1>{{a}}</h1>
    <button @click="add">按我加一</button>
    <button @click="minus">按我减一</button>
</div>
<script src="js/vue.js"></script>
<script>
    new Vue({
        el:'#app',
        data:{
            a:0
        },
        methods:{
            add(){
                this.a++
            },
            minis(){
                this.a--
            }
        }
    })
</script>
</body>
</html>